package cn.hacynn.nd.mapper;

import cn.hacynn.nd.pojo.entity.SafeFile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Author Hacynn
 * @Date 2024/5/27 23:14
 * @Version 1.0
 */
@Mapper
public interface SafeFileMapper extends BaseMapper<SafeFile> {

    /**
     * 根据文件id和用户id删除保险箱文件
     * @param fileId
     */
    @Delete("delete from safe_file where user_id = #{userId} and file_id = #{fileId}")
    void deleteByFileId(Long userId, String fileId);
}
